<script type="text/javascript">
    $(function () {
        //支付方式
        $("#form_yhhk_yhsx").find("[idVal='yhsxmx_zffs_id']").sjzdcombobox("zffs");

        $("#yhsxmx_hkje").unbind("change").bind('change', function () {
            var yhsxmxHkje = $("#yhsxmx_hkje").val();
            var yhsxmxHkrq = $("#yhsxmx_hkrq").datebox('getValue');
            if(!yhsxmxHkje){
                yhsxmxHkje == null;
            }
            if(!yhsxmxHkrq){
                yhsxmxHkrq == null;
            }
            var url = $.webPath() + "/zjgl/yhsx/yhsx_Lxjs?yhsxId="+$("#yhsxId").val()+
                    "&&yhsxmxHkje="+yhsxmxHkje+
                    "&&yhsxmxHkrq="+yhsxmxHkrq;
            $.post(url,function(data){
                if(isNaN(data)){
                    $.messager.alert("提示", data, "error");
                }else{
                    $("#yhsxmx_hxje").numberbox('setValue',data);
                }
            },"text");
        });

        $('#yhsxmx_hkrq').datebox({
            onSelect: function(date){
                var yhsxmxHkje = $("#yhsxmx_hkje").val();
                if(!yhsxmxHkje){
                    yhsxmxHkje == null;
                }
                var url = $.webPath() + "/zjgl/yhsx/yhsx_Lxjs?yhsxId="+$("#yhsxId").val()+
                        "&&yhsxmxHkje="+yhsxmxHkje+
                        "&&yhsxmxHkrq="+$("#yhsxmx_hkrq").datebox('getValue');
                $.post(url,function(data){
                    if(isNaN(data)){
                        $.messager.alert("提示", data, "error");
                    }else{
                        $("#yhsxmx_hxje").numberbox('setValue',data);
                    }
                },"text");
            }
        });


    });
</script>
<form id="form_yhhk_yhsx"  method="post">
    <input id="yhsxId" name="yhsxId" type="hidden" value="${(yhsxId)!''}"/>
    <input name="yhsxmx.id" type="hidden" value="${(yhsxmx.id)!''}"/>
    <table style="width: 100%" class="tb tab-t">
        <col width="90px;"/><col width=""/><col width="90px;"/><col width=""/>
        <tr>
            <th >银行名称：</th>
            <td>
                <input name="yhmcId" type="hidden" value="${(yhmcId)!''}"/>
                <input name="yhmc" type="text" class="input-text" value="${(yhmc)!''}" readonly="readonly"/>
            </td>
            <th>公司名称：</th>
            <td>
                <input name="gsmcId" type="hidden" value="${(gsmcId)!''}" />
                <input name="gsmc" type="text" class="input-text" value="${(gsmc)!''}" readonly="readonly" />
            </td>
        </tr>
        <tr>
            <th>借款金额：</th>
            <td>
                <input name="jkje" type="text" class="easyui-numberbox input-text" value="${(jkje)!''}"
                       data-options="min: 0, groupSeparator: ',',precision:4" readonly="readonly" />
            </td>
            <th>借款日期：</th>
            <td>
                <input name="jkrq" type="text" class="input-text" value="${(jkrq)!''}" readonly="readonly" />
            </td>
        </tr>
        <tr >
            <th style="color:#f45212;"> 支付方式：</th>
            <td>
                <input idVal="yhsxmx_zffs_id" name="yhsxmx.zffs.id" class="input-text"
                       required="true" type="text" value="${(yhsxmx.zffs.id)!''}"/>
            </td>
            <th style="color:#f45212;">票据号码：</th>
            <td>
                <input name="yhsxmx.pjhm" class="easyui-validatebox input-text"
                       validType="remote['${base}/zjgl/yhsx/ajax_validate?yhsxmxId=${(yhsxmx.id)!}',{'validateField':'pjhm'},'票据号码不能重复！']"
                       required="true" type="text" value="${(yhsxmx.pjhm)!''}"/>
            </td>
        </tr>
        <tr>
            <th style="color:#f45212;">还款金额：</th>
            <td>
                <input id="yhsxmx_hkje" name="yhsxmx.hkje" class="easyui-numberbox input-text" type="text"
                       data-options="min: 0, groupSeparator: ',',precision:4" required="true" value="${(yhsxmx.hkje)!}" />
            </td>
            <th>还息金额：</th>
            <td>
                <input id="yhsxmx_hxje" name="yhsxmx.hxje" class="easyui-numberbox input-text"
                       data-options="min: 0, groupSeparator: ',',precision:4" type="text" value="${(yhsxmx.hxje)!}" />
            </td>
        </tr>
        <tr>
            <th style="color:#f45212;">还款日期：</th>
            <td>
                <input id="yhsxmx_hkrq" name="yhsxmx.hkrq" class="easyui-datebox input-text" type="text"
                       required="true" value="${(yhsxmx.hkrq?date)!}"/>
            </td>
        </tr>
        <tr>
            <th>备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注：</th>
            <td>
                <textarea style="width:468px;" rows="2" class="textarea"
                          name="yhsxmx.bz">${(yhsxmx.bz)!}</textarea>
            </td>
        </tr>
    </table>
</form>
